package com.itic.appbase.framework.exception.definition;

/**
 * @author crespo
 * 
 */
public class HttpInvokeException
        extends RuntimeException {
    private static final long serialVersionUID = 9023390431371233851L;

    private final int statusCode;
    private static final int DEFAULT = 500;

    public HttpInvokeException() {
        super();
        this.statusCode = DEFAULT;
    }

    public HttpInvokeException(String message, Throwable cause) {
        super(message, cause);
        this.statusCode = DEFAULT;
    }

    public HttpInvokeException(String message) {
        super(message);
        this.statusCode = DEFAULT;
    }

    public HttpInvokeException(Throwable cause) {
        super(cause);
        this.statusCode = DEFAULT;
    }

    public HttpInvokeException(int statusCode) {
        super();
        this.statusCode = statusCode;
    }

    public HttpInvokeException(int statusCode, String message, Throwable cause) {
        super(message, cause);
        this.statusCode = statusCode;
    }

    public HttpInvokeException(int statusCode, String message) {
        super(message);
        this.statusCode = statusCode;
    }

    public HttpInvokeException(int statusCode, Throwable cause) {
        super(cause);
        this.statusCode = statusCode;
    }

    public int getStatusCode() {
        return statusCode;
    }

}
